<%-- 
    Document   : general
    Created on : Aug 10, 2013, 10:31:17 AM
    Author     : appi
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="beans.item"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Admin home</title>
    </head>
    <body>

    <center>
        <table border="1">
            <thead>
            <th>
                Item id:  
            </th>
            <th>
                Item name:
            </th>
            <th>
                Item quantity:
            </th>
            <th>
                Item price:
            </th>
            <th>
                Item sort description:
            </th>
            <th>
                Item detail description:
            </th>

            </thead>



            <c:forEach items="${sessionScope.product}" var="item">

                <form action="../EditItemAction.do" method="post">

                    <input type="hidden" name="iid" value="${item.id}">
                    <tr>
                        <td>
                            <c:out value="${item.id}"></c:out>&nbsp;
                            </td>

                            <td>
                            <c:out value="${item.iname}"></c:out>&nbsp;
                            </td>

                            <td>
                            <c:out value=""></c:out>&nbsp;
                            </td>

                            <td>
                            <c:out value="${item.iprice}"></c:out>&nbsp;
                            </td>

                            <td>
                            <c:out value="${item.isdesc}"></c:out>&nbsp; 
                            </td>

                            <td>
                            <c:out value="${item.iddesc}"></c:out>&nbsp; 
                            </td>

                            <td>
                                <input type="submit" value="edititem">
                            </td>

                    </form>
                    <form action="../DeleteItemAction.do" method="post">

                       <input type="hidden" name="iid" value="${item.id}">


                    <td>
                        <input type="submit" value="deleteitem">
                    </td>

                </form>


            </c:forEach>
        </table>

        <form action="subadmin.jsp" method="post">
            <input type="submit" value="add subadmin"></form>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <td>
            <form action="additem.jsp" method="post">
                <input type="submit" value="additem"></form>
        </td>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        <td>
            <form action="../LogOutAction.do" method="post">
                <input type="submit" value="Log out"></form>
        </td>
    </center>
</body>
</html>
